/*
 * compile_opt.h
 *
 *  Created on: 2010-5-25
 *      Author: an
 */

#ifndef COMPILE_OPT_H_
#define COMPILE_OPT_H_


/*****************************************************************
_OS_XIN_WIN is the macro for windows os
_OS_XIN_LIN is the macro for linux os
*****************************************************************/

#define _OS_XIN_WIN

//#define _OS_XIN_LIN



/*
 * include head files and libs
 */

#ifdef _OS_XIN_WIN
#include <windows.h>
#include <winsock.h>
#include <stdio.h>
#include <stdlib.h>
#include "mmsystem.h"
#include "stdarg.h"
#define socklen_t int
#define XSTDCALL unsigned long  __stdcall
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "ws2_32.lib")
#define xfstime LONGLONG
#endif

#ifdef _OS_XIN_LIN
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/times.h>
#include <unistd.h>
#include <pthread.h>
#include <fcntl.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include<sys/stat.h>
#include <signal.h>
#include <time.h>
#include <errno.h>
#include <sched.h>
#include <stdarg.h>


#define SOCKET int
#define XSTDCALL long
#define xfstime long long
#endif

#endif /* COMPILE_OPT_H_ */
